Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for raw txn messages in search options #388

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sahilkakwani9
Copy link

Adds functionality to the search feature to recognize and handle base64 encoded raw transaction messages. When a valid base64 encoded transaction message is entered in the search, it now resolves to the transaction inspector path.

Copy link

vercel bot commented Oct 13, 2024

@sahilkakwani9 is attempting to deploy a commit to the Solana Labs Team on Vercel.

A member of the Team first needs to authorize it.

@ngundotra
Copy link
Collaborator

Hey this is an awesome PR! Thanks for sending. Will try out later today!

Copy link
Collaborator

@nickfrosty nickfrosty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this @sahilkakwani9

I just tested this out locally and it does not seem to fully work out of the box.

Also, this being merged should resolve the following issue:

Fixes: #385

app/components/SearchBar.tsx Outdated Show resolved Hide resolved
app/components/SearchBar.tsx Outdated Show resolved Hide resolved
options: [
{
label: 'Decoded Transaction Message',
pathname: `/tx/inspector?message=${search}`,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the inspector can parse a base64 encoded full transaction (message and signatures), the search box should handle that as well.

Can you fix this to support both?

Here is an example full transaction (single memo instruction) that is created by serializing an entire transaction:

AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAID5P9GJXpSnreZM8/18ftjMR6Y3g6/OQm+Ax7miUsjUhEDBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAAVKU1qZKSEGTSTocWDaOHx8NbXdvJK7geQfqEBBBUSNBPY+6MoJeAOVWbvgg6ALv7vjwNbnziJMJUlhpmJZREYCAQAJA+gDAAAAAAAAAgAedGhpcyBpcyBhIHNpbXBsZSBtZW1vIG1lc3NhZ2Uy

Reference: Web3.js serialize Legacy Transaction and Version Transaction

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the review. I have added the support now and it should work accordingly for full serialized transactions as well as serialized messages.

@nickfrosty
Copy link
Collaborator

@sahilkakwani9 is this now ready for review again?

@sahilkakwani9
Copy link
Author

@sahilkakwani9 is this now ready for review again?

Yes ser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants